﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DividedByFive
{
    class DividedByFive
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Write two int numbers so first one would be less than second one");
            Console.Write("a=");
            string first = Console.ReadLine();
            Console.Write("b= ");
            string second = Console.ReadLine();
            int a, b,count;
            if (int.TryParse(first, out a))
            {
                Console.WriteLine();
            }
            else
            {
                Console.WriteLine("Invalid first number.Try another time");
            }
            if (int.TryParse(second, out b))
            {
                Console.WriteLine();
            }
            else
            {
                Console.WriteLine("Invalid second number.Try another time");
            }
            count = 0;
            for (int i = a; i <=b; i++)
            {
                if (i % 5 == 0)
                {
                    count++;
                }
            }
            Console.WriteLine("There is {0} numbers in interval {1} <-> {2} divided by 5 without remainder ",count,a,b);

        }
    }
}
